\documentclass{beamer}
\begin{document}

\begin{frame}[fragile]
\begin{semiverbatim}
int main() \{
  \uncover<2->{return 0;}
\}
\end{semiverbatim}
\end{frame}

\end{document}
